package com.bean;

public class User {
	private int id;
	private String name="";
	private String password="";
	private String email="";
	private String sex;
	private int age;
	public int getId() {
		return id;
	}
	public User(int id, String name, String password, String email, String sex, int age) {
		super();
		this.id = id;
		this.name = name;
		this.password = password;
		this.email = email;
		this.sex = sex;
		this.age = age;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
	
	
	public User(String name,String password,String email){
		this.name=name;
		this.password=password;
		this.email=email;
	}
	
	public User(){}


	public String getName() {
		return name;
	}


	public void setName(String name) {
		this.name = name;
	}


	public String getPassword() {
		return password;
	}


	public void setPassword(String password) {
		this.password = password;
	}
	
	
	public String toString(){
		return name;
	}
	
	public boolean equal(Object obj){
		if(obj instanceof User){
			User temp=(User)obj;
			return this.toString().equals(temp.toString());
		}
		return false;
	}


	public String getEmail() {
		return email;
	}


	public void setEmail(String email) {
		this.email = email;
	}
	

}
